export default {
  tooltip: {
    formatter: function(val) {
      const { chart } = val
      const { xAxis = [] } = chart
      let ret = this.key === 0 ? '小于' + xAxis[0].categories[1] : this.key

      return ret + '小时<br />' + this.y + '只'
    }
  },
  chart: {
    type: 'column',
    reflow: true,
    backgroundColor: '#1c213e',
    options3d: {
      enabled: true,
      alpha: 15,
      beta: 0,
      depth: 50,
      viewDistance: 25
    },
    spacingTop: 20,
    spacingRight: 25,
    spacingBottom: 10,
    spacingLeft: 10
  },
  xAxis: {
    title: {
      text: '小时',
      x: 25,
      y: 7,
      align: 'high',
      style: {
        color: '#ffffff'
      },
      offset: 0
    },
    lineColor: '#41537d',
    labels: {
      style: {
        color: '#ffffff'
      },
      formatter: function() {
        const { axis, value } = this
        let ret = value
        if (value === 0) {
          ret = '<' + axis.categories[1]
        }
        return ret
      }
    },
    gridLineColor: 'transparent'
  },
  yAxis: {
    min: 0,
    title: {
      text: '只',
      align: 'high',
      rotation: 0,
      style: {
        color: '#ffffff'
      },
      offset: 12,
      y: -13
    },
    lineColor: '#41537d',
    labels: {
      style: {
        color: '#ffffff'
      }
    },
    gridLineColor: 'transparent'
  },
  plotOptions: {
    column: {
      borderWidth: 0,
      showInLegend: false
    }
  },
  series: [{}]
}
